package com.hxzy.controller;

import com.hxzy.common.dto.PageDTO;
import com.hxzy.common.vo.PageResultVO;
import com.hxzy.common.vo.ResultVO;
import com.hxzy.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

@Api(value = "角色维护", tags = {"角色维护的controller"})
@RestController
@RequestMapping(value = "/api")
public class RoleController {

    @Autowired
    private RoleService roleService;


    @ApiOperation(value = "查询角色列表", notes = "查询角色列表", httpMethod = "GET")
    @GetMapping(value = "/role/data")
    public ResultVO<PageResultVO> search( @ModelAttribute PageDTO pageDTO){
        return ResultVO.success( this.roleService.search(pageDTO));
    }
}
